package com.wx.wxsecondskill.dao;

import com.wx.wxsecondskill.po.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @ClassName UserDao
 * @Author wx
 * @Description 用户dao
 * @Date 2018-11-14-22:03
 */
@Mapper
public interface UserDao {

    @Select("select * from user where id = #{id}")
    User getById(@Param("id")String id);
    @Insert("insert into user(id, name)values(#{id}, #{name})")
    int insert(User user);

    @Select("select * from user limit 1")
    User getFirstUser();
}
